package com.wang.controller;

import com.aaa.entity.EmpInfo;
import com.aaa.vo.Result;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.wang.service.EEmpInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author :  DongZheng Wang
 * @PROJECT_NAME: fifth-cai-parent
 * @date :  2023-03-01 10:44
 **/

@RestController
@RequestMapping("/emp1/updatePassword")
public class UpdatePassword {
    @Autowired
    private EEmpInfoService eEmpInfoService;
    @RequestMapping("/{oldPassword}/{newPassword}")
    public Result updatePassword(@PathVariable String newPassword,@PathVariable String oldPassword) {
        eEmpInfoService.updatePassword(newPassword, oldPassword);
        return new Result(2000, "success");
    }

}
